package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.diss.DetailDissBo;
import com.zhuss.bean.bo.core.diss.SearchDissBo;
import com.zhuss.common.PageVo;
import com.zhuss.bean.vo.core.diss.ListDissVo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.core.diss.DissReadServiceExt;
import com.zhuss.exception.DzcxException;


/**
 * @description: 吐槽查询Controller
 * @author: zhushanshuo
 * @create: Tue Feb 02 15:22:08 CST 2021
 **/
@RestController
@RequestMapping("/diss")
public class DissReadController extends BaseController {

	@Autowired
	@Qualifier("dissReadService")
	private ReadService<Object, Object> dissReadService;

	@Autowired
	@Qualifier("dissReadServiceExt")
	private DissReadServiceExt dissReadServiceExt;

	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailDissBo bo) throws DzcxException {

		Object result = dissReadService.detail(bo);
		return result;
    }

	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchDissBo bo) throws DzcxException {

		Object result = dissReadService.list(bo);
		return result;
    }

}
